package omg.ligong.dao;

import java.util.List;
import java.util.Map;

import omg.ligong.domain.Student;

public interface StudentDAO {
	/**
	 * 根据学号查找学生
	 * 
	 * @param no
	 * @return
	 */
	Student findStudentByNo(String no) throws Exception;

	/**
	 * 根据用户名和密码查找学生
	 * 
	 * @param no
	 * @param password
	 * @return
	 */
	Student findStudentByAuth(String no, String password) throws Exception;

	/**
	 * 添加学生
	 * 
	 * @param student
	 */
	void addStudent(Student student ) throws Exception;

	/**
	 * 根据学号删除学生
	 * 
	 * @param no
	 */
	void delStudentByNo(String no) throws Exception;

	/**
	 * 修改学生信息
	 * 
	 * @param no
	 * @param student
	 */
	void modifyStudent(String no, Map student) throws Exception;

	/**
	 * 列出所有学生
	 * 
	 * @param offset
	 * @param count
	 * @return
	 */
	List listAllStudent(int offset, int count) throws Exception;

	/**
	 * 根据学生专业列出学生
	 * 
	 * @param major
	 * @param offset
	 * @param count
	 * @return
	 */
	List listStudentByMajor(String major, int offset, int count) throws Exception;

}
